function [ g ] = MyConv2D( f,h )
%MYCONV2D Summary of this function goes here
%   Detailed explanation goes here

    sf = size(f);
    sh = size(h);
    
    zf = zeros(sf(1)+(2*sh(1)), sf(2)+(2*sh(2)), class(f));    
    zh = zf;
    zf(sh(1)+(1:sf(1)), sh(2)+(1:sf(2))) = f;
    zh(1:sh(1),1:sh(2)) = h;
    
    F = fft2(zf);
    H = fft2(zh);
    
    
    g = real(ifft2(F.*H));
    o = floor(1.5*sh);
    
    g = g(o(1)+(1:sf(1)), o(2)+(1:sf(2)));
end

